import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import User from '@/components/User'
import Student from "../components/Student";
import UserAdd from "../components/UserAdd";
import UpdataUser from "../components/UpdataUser";


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/user',
      name: 'User',
      component: User,
      children: [{
        path: 'add',
        name: 'Useradd',
        component: UserAdd
      },{
        path:'updata',
        name:'Updata',
        component:UpdataUser
      }],
    },
    {
      path: '/student',
      name: 'Student',
      component: Student
    }
  ]
})
